//
// Created by jsjxsy on 2022/8/15.
// memchr与strchr 区别
//当字符串前面是0x0的时候，会继续查找
//
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
  char *str1 = (char *) malloc(sizeof(char) * 20);
  strcpy(str1 + 4, "Hello World");
  char *result = (char *) memchr(str1, 'o', 20);
  printf("result = %s\n", result);
  char *result1 = strchr(str1, 'o');
  printf("result1 = %s\n", result1);
  free(str1);
  return 0;
}
